CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_face_summary(
id                                                 bigint                         COMMENT '主键ID',
collect_no                                         String                         COMMENT '批次号',
dec_network_id                                     bigint                         COMMENT '扣款网点ID',
dec_network_code                                   String                         COMMENT '扣款网点CODE',
dec_network_name                                   String                         COMMENT '扣款网点名称',
inc_network_id                                     bigint                         COMMENT '加款网点ID',
inc_network_code                                   String                         COMMENT '加款网点CODE',
inc_network_name                                   String                         COMMENT '加款网点名称',
amount                                             Double                         COMMENT '汇总金额(必须大于0)',
fee_type_id                                        bigint                         COMMENT '账单费用类型ID',
fee_type_code                                      String                         COMMENT '账单费用类型CODE',
fee_type_name                                      String                         COMMENT '账单费用类型名称',
ibk_fee_code                                       String                         COMMENT '预付款费用类型',
ibk_status                                         smallint                       COMMENT '以IBKBILLSTATUSENUM枚举类型为准',
is_payment                                         smallint                       COMMENT '1未转预付款 2成功 3失败',
payment_time                                       timestamp                      COMMENT '转预付款时间',
type                                               smallint                       COMMENT '1汇总账单 2调整汇总',
bill_date                                          String                         COMMENT '账单/调整记录日期',
create_time                                        timestamp                      COMMENT '创建时间',
update_time                                        timestamp                      COMMENT '更新时间',
gather_network_id                                  bigint                         COMMENT '结算网点ID',
gather_network_code                                String                         COMMENT '结算网点编码',
gather_network_name                                String                         COMMENT '结算网点名称',
business_date                                      String                         COMMENT '业务发生日期'
)
COMMENT '面单费汇总记录表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_face_summary'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);